// ==================================================================
// 描 述：
// 作 者：王征:D
// 创建时间：2019/05/17 17:44:47
// ==============================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

namespace AutoChess
{
    class GameControlOperationMsg : OpretionMsg
    {
        public GameControlOperationMsg() : base(OpretionType.Control)
        { }

        public static ClickDownUnitMsg NewClickDownUnitMsg(ACGrid selectedUnit)
        {
            return new ClickDownUnitMsg(selectedUnit);
        }
        public static ClickUpUnitMsg NewClickUpUnitMsg(ACGrid last, ACGrid cur)
        {
            return new ClickUpUnitMsg(last, cur);
        }
        public static HoldingUnitMsg NewHoldingUnitMsg(ACGrid selectedUnit)
        {
            return new HoldingUnitMsg(selectedUnit);
        }
    }

    class ClickDownUnitMsg : GameControlOperationMsg
    {
        public ACGrid selectedUnit;
        public ClickDownUnitMsg(ACGrid selectedUnit)
        {
            this.selectedUnit = selectedUnit;
        }
    }

    class ClickUpUnitMsg : GameControlOperationMsg
    {
        public ACGrid lastSelectedUnit;
        public ACGrid curSelectedUnit;
        public ClickUpUnitMsg(ACGrid last, ACGrid cur)
        {
            lastSelectedUnit = last;
            curSelectedUnit = cur;
        }
    }

    class HoldingUnitMsg : GameControlOperationMsg
    {
        public ACGrid selectedUnit;
        public HoldingUnitMsg(ACGrid selectedUnit)
        {
            this.selectedUnit = selectedUnit;
        }
    }
}
